<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div class="pageContent">
<form method="post" action="${rootUrl}/goods/goods-price/0/updatePrice" class="pageForm required-validate" onsubmit="return validateCallback(this, newDialogAjaxDone);">
	<input type="hidden" name="goodsId" value="${goodsId }">
	<table class="table" targetType="dialog"  width="100%" layoutH="56">
		<thead>
			<tr>
				<th width="30" align="center" >序号</th>
				<th width="100">价格分类</th>
				<th width="100">价格</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${goodsPrices}" var="goodsPrice" varStatus="status">
			<tr target="data_id" rel="${goodsSku.id}">
				<td>${status.count}</td>
				<td>${goodsPrice.priceClassName}</td>				
				<td><input name="goodsPrices[${status.index }].id" value="${goodsPrice.id }" type="hidden"/>
				<input class="listMoneyField" name="prices[${status.index }]" value="<fmt:formatNumber value='${goodsPrice.price/100}' pattern='0.00'/>"
					onfocus="if (value =='0.00'){value =''}"  
            		onblur="if (value ==''){value='0.00'}" type="text"/></td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
	</div>
	</form>
</div>